/**
 * pollingSocket链接
 * by blue
 * 功能：polling方式socket接口
 */
fangimjs.define("sdk/pollingSocket", ["util/util", "setting/setting", "sdk/longConnectSocket", "sdk/socket"], function (require, exports, module) {
    "use strict";
    /*flash加载判断操作*/
    var socket = require('sdk/socket');
    function pollingSocket() {
        /**
         * flash对象
         * @type {null}
         * @private
         */
        var _core = null;
        /**
         * 初始化
         */
        this.init();
        /**
         * 获取并返回flash对象
         * @returns {null}
         */
        this.core = function () {
            if (_core == null) {
                _core = require("sdk/longConnectSocket");
            }
            return _core;
        };
        this.initSocket = function() {
            var data = fangimjs.data.vars.config;
            this.initSocketData(!!data.username ? "weblg" : "web");
        };
    }
    pollingSocket.prototype = socket;
    module.exports = new pollingSocket();
});
